xen/evtchn: Add an helper to reserve/allocate a port
authorStanislav Kinsburskii <staskins@amazon.com>
Wed, 7 Sep 2022 16:27:33 +0000 (17:27 +0100)
committerJulien Grall <jgrall@amazon.com>
Thu, 8 Sep 2022 11:21:58 +0000 (12:21 +0100)
commit4e1eade78ef3f339ed671851abce398e80ba04ca
tree73b7354fdfcf65c4f8cce22c9d82cf8e47567174
parent5d1cfe844e23cb1610ef07f60bc8076e058891d6
xen/evtchn: Add an helper to reserve/allocate a port

In a follow-up patch we will want to either reserve or allocate a port
for various event channel helpers.

A new wrapper is introduced to either reserve a given port or allocate
a fresh one if zero.

Take the opportunity to replace the open-coded version in
evtchn_bind_virq().

Signed-off-by: Stanislav Kinsburskii <staskins@amazon.com>
Signed-off-by: Julien Grall <jgrall@amazon.com>
Signed-off-by: Rahul Singh <rahul.singh@arm.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/common/event_channel.c